#ifndef _VERTEXFORMATS_H
#define _VERTEXFORMATS_H

#include "../Shaders/Defs/Types.hlsli"
#ifdef __cplusplus
#include <d3d11.h>
#include "../EdgeMath/Vectors.h"

#define POS_SEMANTIC
#define UV_SEMANTIC
#define NORM_SEMANTIC
#define TAN_SEMANTIC
#define COLOR_SEMANTIC
#else
#define POS_SEMANTIC : POSITION
#define UV_SEMANTIC : TEXCOORD
#define NORM_SEMANTIC : NORMAL
#define TAN_SEMANTIC : TANGENT
#define COLOR_SEMANTIC : COLOR

#endif

#ifdef __cplusplus

namespace VertexFormats
{
	enum Vertex_Type
	{
		VERTEX_TYPE_POSITION = 1,
		VERTEX_TYPE_POSITION_TEXCOORD,
		VERTEX_TYPE_POSITION_COLOR = 4,
		VERTEX_TYPE_POSITION_TEXCOORD_NORMAL = 8,
		VERTEX_TYPE_POSITION_TEXCOORD_NORMAL_TANGENT = 16,
	};
#endif // #ifdef __cplusplus
	struct Vertex
	{
		float3 position POS_SEMANTIC;

#ifdef __cplusplus
		Vertex(void);
		Vertex(float3& position);

		static ID3D11InputLayout* getInputLayout(void);
#endif
	};
	struct VertexTexture
	{
		float3 position POS_SEMANTIC;
		float2 texCoord UV_SEMANTIC;

#ifdef __cplusplus
		VertexTexture(void);
		VertexTexture(float3& position, float2& texCoord);

		static ID3D11InputLayout* getInputLayout(void);
#endif
	};

	struct VertexNormalTexture
	{
		float3 position POS_SEMANTIC;
		float3 normal NORM_SEMANTIC;
		float2 texCoord UV_SEMANTIC;

#ifdef __cplusplus
		VertexNormalTexture(void);
		VertexNormalTexture(float3& position, float2& texCoord, float3& normal);

		static ID3D11InputLayout* getInputLayout(void);
#endif
	};

	struct VertexColor
	{
		float3 position POS_SEMANTIC;
		float4 color COLOR_SEMANTIC;

#ifdef __cplusplus
		VertexColor(void);
		VertexColor(float3& position, float4& color);

		static ID3D11InputLayout* getInputLayout(void);
#endif
	};

	struct VertexNormalTextureTangent
	{
		float3 position POS_SEMANTIC;
		float3 normal NORM_SEMANTIC;
		float3 tangent TAN_SEMANTIC;
		float2 texCoord UV_SEMANTIC;

#ifdef __cplusplus
		VertexNormalTextureTangent(void);
		VertexNormalTextureTangent(float3& position, float3& normal, float3& tangent, float2& texCoord);

		static ID3D11InputLayout* getInputLayout(void);
#endif
	};
#ifdef __cplusplus
}
#endif
#endif